#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>

void reserve(char* p)
{
	int ret = strlen(p);
	char tmp = *p;
	*p = *(p + ret - 1);
	*(p + ret - 1) = '\0';
	if (strlen(p) > 1)
	{
		reserve(p + 1);
	}
	*(p + ret - 1) = tmp;
}

int main()
{
	char ch[] = "abcdef";
	reserve(ch);
	printf("%s", ch);
	return 0;
}

